<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title></title>
		<link href="../css/mui.min.css" rel="stylesheet" />
		<link href="../css/together.css" rel="stylesheet" />
		<style>
			ul {
				font-size: 14px;
				color: #8f8f94;
			}
			.mui-btn {
				padding: 10px;
			}
			.mui-table-view-cell>a:not(.mui-btn){
				margin:0;
			}
			
			.mui-content>.mui-table-view:first-child {
    margin-top: 0;
}
		</style>
	</head>

	<body>
		<!--
        	作者：592176224@qq.com
        	时间：2018-12-03
        	描述：
       
		<header class="mui-bar mui-bar-transparent" style="padding-right: 15px;">
			<a class="mui-action-back black mui-icon mui-icon-left-nav mui-pull-left"></a>
			<h1 class="mui-title">邀请</h1>
		</header>
		 -->
		<header class="mui-bar mui-bar-nav m_barC">
		    <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
		    <h1 class="mui-title">邀请</h1>
		</header>

		<div class="mui-content ">
			
			<ul class="mui-table-view m_color setl0">
			    <li class="mui-table-view-cell padd15 setl0 flex5" id="yqid">
			    	  <img class="mui-media-object mui-pull-left" src="../images/weixin.png">
			        <a class="mui-navigate-right mui-media-body">通过微信邀请</a>
			    </li>
			    <!--
                	作者：592176224@qq.com
                	时间：2019-01-18
                	描述：
			    <li class="mui-table-view-cell padd15 setl0 flex5">
			    	 <img class="mui-media-object mui-pull-left" src="../images/qq.png">
			        <a class="mui-navigate-right mui-media-body">通过QQ邀请</a>
			    </li>
                -->
			</ul>
		</div>
		<script src="../js/mui.min.js"></script>
		<script src="../js/app.js"></script>
		<script src="../js/req.js" type="text/javascript" charset="utf-8"></script>
		<script src="../js/muishow.js" type="text/javascript" charset="utf-8"></script>
		<script src="../js/plusshare.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			var bid = 0;
			window.onload = function(){
				mui.init();
				bid = getrequest().bid;
				mui.plusReady(function(){
					let view = plus.webview.currentWebview();
					bid = view.bid;
				})
				
				g("yqid").addEventListener("tap",function(e){
					 e.detail.gesture.preventDefault();
							let btnArray = ["取消","确定"];
							mui.prompt("请输入邀请留言:","","",btnArray,function(e){
								if(e.index == 1){
									
									shareApp(e.value);
								}
							})

					})
				
			}
			function shareApp(value) {				
				//分享内容，开发者可自定义
				
				let lurl = 'http://www.weishu.cn/index/Index/index/bid/'+ bid +'.html ';
				var message = {
					title: "渭书", //应用名字
					content: value,
					href: lurl, //分享出去后，点击跳转地址
					thumbs: ['../images/logo.png'] //分享缩略图
				}
				
				//调起分享
				plusShare(message, function(res) {
					//分享回调函数
					if(res) {
						plus.nativeUI.toast("分享成功");
					} else {
						plus.nativeUI.toast("分享失败");
					}
				})
			}
		</script>
	</body>

</html>